4 # IMPORTANT: Use the following statement at the TOP OF EVERY TEST SCRIPT
5 # to ensure that this package's 'bin/' subfolder is added to the path so that
6 # this package's CLIs can be invoked by their mere filename in the rest
9 PATH
=${PWD%%/test*}/bin
:$PATH
11 # Helper function for error reporting.
12 die
() { (( $# > 0 )) && echo "ERROR: $*" >&2; exit 1; }
14 # Get verbose info: name<tab>version<tab>core-status<tab>path
15 out
=$
(whichpm
-v Data
::Dumper
) || die
17 # Split result into tokens.
18 IFS
=$
'\t' read -ra tokens
<<<"$out"
20 # Make sure the 2nd token looks like a version number.
22 [[ $verToken =~ ^v?
[[:digit
:]]+\.
]] || die
"Expected version number as 2nd output field, got '$verToken'."